/*
 * TitleIterator.h
 *
 *  Created on: 6 May 2010
 *      Author: Savramis Sartios
 */

#ifndef TITLEITERATOR_H_
#define TITLEITERATOR_H_
#include "../List/ITitleList.h"

class TitleIterator: public ITitleListIterator {
public:
	TitleIterator(const ITitleList *list);
	virtual ~TitleIterator();
	/**
		 * Set the current pointer to the beginning
		 */
		virtual void	first();

		/**
		 * Increase the current pointer +1
		 */
		virtual void	next();

		/**
		 * Checks if the current pointer points inside the list
		 * \return true if pointer points inside the list
		 */
		virtual bool isDone()const;

		/**
		* Returns the current element
		* \return string
		* \throw  OutOfBound
		*/
		virtual string *	getCurrent()const;
		/**
		* Returns the value under the code
		* \return code the course code
		* \throw  OutOfBound
		*/
		virtual string * 	getValue(const string *code);
private:
	bool setIterator(const ITitleList *list);
	ITitleList *list_;
	int current_;
	map<string*,string*>::iterator it_;
};

#endif /* TITLEITERATOR_H_ */
